package com.example.demo.service;

import java.io.Serializable;

import lombok.Data;

/**
 * @author duyunshan
 * @date 22/05/24
 */
@Data
public class OrderTicketBody implements Serializable {

    public static OrderTicketBody of(
//        int tickets,
        String mobile,
        double fee,
        String productName,
        String memberId,
        String productId,
        String shipType
    ) {

        OrderTicketBody orderTicketBody = new OrderTicketBody();
//        orderTicketBody.args.tickets = tickets;
        orderTicketBody.args.mobile = mobile;
        orderTicketBody.args.fee = fee;
        orderTicketBody.args.productName = productName;
//        orderTicketBody.args.commonActivityParamsCache.memberId = memberId;
//        orderTicketBody.args.commonActivityParamsCache.productId = productId;
        orderTicketBody.args.ticket_product_id = productId;
//        orderTicketBody.args.ship_type = shipType;

        return orderTicketBody;
    }

    private Arg args = new Arg();

    @Data
    public static class Arg implements Serializable {

        private int tickets = 1;    //
        private String mobile = "15657185751";  //
        //        private Object member_name;
        private String ticket_product_id = "1891213";   //
        private String customer_note = "";
        private boolean agreement = true;
        private String hotel_id = "190631";
        private String pay_channel = "wxpay";
        private int bundle_id = 0;
        //        private Object bundleDetail  = "";
        private double fee = 6.18; // 可以不填
        private String member_level = "";
        private String member_type = "";
        private String productName = "";    // 必填, 但可以是空字符串
        private String productType = "normal";
        private int currentMemberLevel = 361841;
        private boolean hasBuyGiftActivity = false; // 礼品?
//        private CommonActivityParamsCache commonActivityParamsCache = new CommonActivityParamsCache();
        private String booking_mode = "0";
        private String reservationStartTime = "";   // 酒店?
        private String reservationEndTime = "";     // 酒店?
        private String productRelationId = "";
        //        private CurrentTyingBean currentTying = new CurrentTyingBean();
        private String product_hotel_id = "190631";
//        private String source = "official_artical"; // 已知渠道:官方/广告?
        private String hid = "183066";
//        private String ship_type = "not_filled_now";    // 可以不填, 邮寄方式, 按摩的不需要传, 传成粽子的会报错
        private String idCardType = "ID_CARD";
//        private List<?> coupon_list = new ArrayList<>();
//        private List<?> couponList = new ArrayList<>();

        @Data
        public static class CommonActivityParamsCache implements Serializable {

            private String channel = "SAAS";
            private String hotelId = "190631";
            private String memberId = "204403372"; // 会员ID, 可以不填
            private String productId = "1891213";   // 购买产品Id, 必填, 注意更改
            private String productType = "TICKET_PRODUCT";
            private int brandId = 182176;
            private String zktPlatform = "wxa_home";
//            private List<?> subTicketProductIds = new ArrayList<>();
        }

//        @Data
//        public static class CurrentTyingBean implements Serializable {
//
//        }
    }

}
